package com.sc.nft.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.enums.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
@Data
public class SaasTaskBasicsVO {
    @ApiModelProperty(value = "任务id")
    private Long id;

    @ApiModelProperty(value = "dao名称")
    private String daoName;

    @ApiModelProperty(value = "任务名字")
    private String taskName;

    @ApiModelProperty(value = "任务icon")
    private String taskIcon;

    @ApiModelProperty(value = "任务剩余数量")
    private Integer taskTotalSum;

    @ApiModelProperty(value = "任务完成总次数")
    private Integer taskResidueSum;

    @ApiModelProperty(value = "任务每个人最大完成上限")
    private Integer taskEveryoneSum;

    @ApiModelProperty(value = "启用状态 1:启动 0:未启动")
    private SaasTaskStatusEnum taskStatus;

    @ApiModelProperty(value = "启用状态描述")
    private String taskStatusDescribe;

    @ApiModelProperty(value = "开始时间")
    @JsonFormat(pattern = "yyyy.MM.dd HH:mm:ss", timezone = "GMT+8")
    private Date taskStart;

    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy.MM.dd HH:mm:ss", timezone = "GMT+8")
    private Date taskEnd;

    @ApiModelProperty(value = "配置状态 1:未配置奖励  2:未提交审核 3:审核中 4:撤销审核 5: 审核未通过 6: 审核通过")
    private SaasTaskConfigurationEnum taskConfiguration;

    @ApiModelProperty(value = "审核备注")
    private String taskRemark;

    @ApiModelProperty(value = "任务类型描述")
    private String taskType;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy.MM.dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;


    public void setTaskType(SaasTaskTypeEnum taskType) {
        this.taskType = taskType.getDesc();
    }

    public void setTaskStatus(SaasTaskStatusEnum taskStatus) {
        this.taskStatus = taskStatus;
        this.taskStatusDescribe=taskStatus.getDesc();
    }
}
